// redux容器组件中必须导入react
import React from 'react';
import { connect } from 'react-redux';
// 导入actions
import { increment,decrement,incrementAsync } from '../redux/actions';
// 导入UI组件
import Counter from '../components/Counter';

// 调用connect高阶函数, 向UI组件中传递props(state,increment,decrement,incrementAsync)
export default connect(
    state=>({counter:state.counter}),
    {increment,decrement,incrementAsync}
)(Counter)
